Content-based similarity retrieval for multimedia data becomes important after international coding standards were established, such as JPEG, MPEG-1, MPEG-2, and MPEG-4, which have been widely used over the Internet. In general, one image can express than words. When performing similarity retrieval for multimedia databases, the retrieval result would depend on user's definition on image similarity. For a content-based image retrieval system, the retrieval performance would be affected by the result of image segmentation. In general, if features extracted from the entire image include trivial background information, it would bias the retrieval result.
Concerning image pre-processing, good retrieval performances can be achieved only when the key subject of visual contents is precisely specified. For example, shape descriptors should be applied to descriptions of the shape of meaningful objects instead of blind descriptions of the entire image.
Mathematical morphology is a set-theoretically method for image processing. It is a powerful tool and it can be employed in removing backgrounds or extracting foregrounds of visual content. Some basic morphological operations, such as erosion, dilation, opening, and closing, will be introduced as follows.
Dilation and erosion of a gray-level image I(x, y) by a two dimensional structure element (SE) B (for example, a disk or square) are respectively defined as(I[+]B)(x,y)=max{I(x−k, y−l)|(k,l)εB}  (1)(I[−]B)(x,y)=min{I(x+k, y+l)|(k,l)εB}  (2)where [+] and [−] are dilation and erosion operators respectively. When performing dilation and erosion operations to an image by using a structure element in the shape of a circular disk, it looks like the circular disk moves around the boundary between foreground areas and background areas. The circular disk broadens or reduces the boundary corresponding to dilation or erosion operations.
Opening operation is accomplished by performing erosion and then dilation; closing operation is accomplished by performing dilation and then erosion. Opening and closing operations for a gray-level image I are respectively defined asI∘B=(I[−]B)[+]B  (3)I●B=(I[+]B)[−]B  (4)where ∘ and ● are opening and closing operators respectively. Opening operation smoothes the contours of an object and removes thin protrusions; closing operation generally fuses narrow breaks, and fills long thin gulfs and small holes. Please refer to FIGS. 1a and 1b, where FIG. 1a shows an original image I and FIG. 1b shows an image, denoted as IBO, which is obtained by performing opening operation to the original image I.
However, conventional opening and closing operations can not preserve the boundary information between foreground areas and background areas on an image. For identifying visual content foregrounds, there exist drawbacks when processing images by utilizing conventional morphology.